Formal Verification of Programs and Their Transformations
نویسندگان
چکیده
Formal verification is an act of using formal methods to check the correctness of intended programs. The verification is done by providing a formal proof on an abstract mathematical model of the program, with respect to a certain formal specification or property. We present three case studies on using formal methods to verify programs and their transformations: (1) we use term rewriting and theorem proving to construct and validate a compiler from logic specifications to ARM assembly code; the equivalence of a source specification and the generated assembly code is proven mechanically with respect to the formal semantics; (2) we model, in an “executable” declarative language TLA+, the Message Passing Interface (MPI) 2.0 library as well as C programs using MPI calls for parallel computations; and use explicit model checking to check the specifications and programs; and (3) we model CUDA kernel programs as symbolic logical formulas, and use constraint solving to automatically reason about these Graphics Processing Unit (GPU) kernels. We have built a couple of unique verification tools to check intrinsic properties (e.g. race freedom for concurrent programs and translation correctness for compilers) and user-defined properties (e.g. functional correctness). Specifically, the presented compiler is the first trusted compiler translating logic specifications embedded in a theorem prover to low-level code; the MPI specification is the first attempt to provide executable semantics for a comprehensive set of message passing Application Programming Interfaces (APIs); and the CUDA verifier is the only existing formal symbolic checker for GPU kernel programs.
منابع مشابه
A Formalism for Automated Verification of Model Transformations
Verification of models and model processing programs are fundamental issues and are inevitable in model-based software development in order to apply them in realworld solutions. Verification concerns the analysis of non-functional and functional properties as well. Model transformation developers are interested in offline methods for the verification process. Offline analysis means that only th...
متن کاملEfficient Automatic Verification of Loop and Data-flow Transformations by Functional Equivalence Checking
Thesis — Automatic and efficient verification of loop and data-flow transformations commonly applied while optimizing digital signal processing and scientific computing programs is feasible by functional equivalence checking of the original and transformed programs. Application of transformations, in general, is known to enable efficient implementation of programs. For resource constrained embe...
متن کاملFormal verification of automatically generated C-code from polychronous data-flow equations
Synchronous data-flow languages are used as design approaches in developing embedded and critical real-time systems in which synchronous programs are verified by applying formal verification. In a synchronous design approach, transformation and optimization are used to transform synchronous programs and generate general purpose executable code. The incorrectness of the transformations make the ...
متن کاملDefining Object-Oriented Execution Semantics Using Graph Transformations
In this paper we describe an application of the theory of graph transformations to the practise of language design. In particular, we have defined the static and dynamic semantics of a small but realistic object-oriented language (called TAAL) by mapping the language constructs to graphs (the static semantics) and modelling their effect by graph transformation rules (the dynamic semantics). Thi...
متن کاملTowards Evaluating Size Reduction Techniques for Software Model Checking
Formal verification techniques are widely used for detecting design flaws in software systems. Formal verification can be done by transforming an already implemented source code to a formal model and attempting to prove certain properties of the model (e.g. that no erroneous state can occur during execution). Unfortunately, transformations from source code to a formal model often yield large an...
متن کامل